<?php
namespace API\Controller;
use Think\Controller;
class MasterController extends Controller {
    public function getmaster(){
        $master=M('master');
        $data=$master->order("mid")->select();
        echo json_encode($data);
   

    }
    public function getmasterbyid(){
    	$mid=$_GET['mid'];
        $master=M('master');
        $data=$master->where("mid=$mid")->select();
        echo json_encode($data);
   

    }
   public function getmasterbyname(){
    	$mname=$_GET['mname'];
        $master=M('master');
        $data=$master->where("mname=$mname")->select();
        echo json_encode($data);
   

    } 
}